#!/usr/bin/env bash

MAVEN_FILE_NAME=apache-maven-bin.tar.gz
MAVEN_URL=https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
MAVEN_HOME=maven
curl -o $MAVEN_FILE_NAME $MAVEN_URL
rm -rf $MAVEN_HOME && mkdir $MAVEN_HOME
tar -zxvf $MAVEN_FILE_NAME --strip-components 1 -C $MAVEN_HOME
rm -rf $MAVEN_FILE_NAME